<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>			
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>供应商</title>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/common/header_changeLi.js"></script>
	<link rel='stylesheet prefetch' href='${pageContext.request.contextPath}/css/common/main_head.css'>
	<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
	<link rel='stylesheet prefetch' href='${pageContext.request.contextPath}/css/bootstrap/bootstrap.min.css'>
	<link rel='stylesheet prefetch' href='${pageContext.request.contextPath}/css/provider/providerMain.css'>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/common/jquery-2.0.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/common/bootstrap.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/information/infoPage.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/fabric/fabricList.js"></script>
	<link href="${pageContext.request.contextPath}/css/common/page.css"rel="stylesheet">
</head>


<body>
	<!-- 顶部部分 -->
	<header>
		<div class="rightTop">
			<ul>
				<li><a href="#">登录</a></li>
				<li class="separator">|</li>
				<li><a href="#">注册</a></li>
				<li class="separator">|</li>
				<li><a href="login.html">个人中心</a></li>
			</ul>
		</div>
		<div class="headermenu">
			<ul>
				<li><a href="#">首页</a></li>
				<li><a href="#">作品</a></li>
				<li><a href="#">设计师</a></li>
				<li><a href="#">品牌服装</a></li>
				<li><a href="#">服装企业</a></li>
				<li><a href="${pageContext.request.contextPath}/fabric/getFabricMain.do">面料</a></li>
				<li  class="curent"><a href="${pageContext.request.contextPath}/provider/providerInfo.do?pageindex=1&pagesize=3">供应商</a></li>
				<li><a href="${pageContext.request.contextPath}/information/information.do?pageindex=1&pagesize=6">资讯</a></li>
			</ul>
		</div>
		<div class="search">
			<input type="text" placeholder="我想找···" />
		</div>
	</header>

	<!-- 内容部分 -->
	<div class="content">
		<div class="container">
			<p class="c_title">位置：<a href="#">FCS</a> >> 供应商</p>
			<div class="row-fluid">
				<div class="span3 pinfo">
					<ul>
						<li class="c_info_title">最新面料资讯</li>
						<c:forEach items="${infoBytimeList}" var="infoBytime">
							<li>
								<a href="#">${infoBytime.title}</a>
							</li>
						</c:forEach>
					</ul>
				</div>
				<div class="span6">
					<div class="carousel slide" id="carousel-755048">
						<ol class="carousel-indicators">
							<li data-slide-to="0" data-target="#carousel-755048">
							</li>
							<li data-slide-to="1" data-target="#carousel-755048">
							</li>
							<li data-slide-to="2" data-target="#carousel-755048">
							</li>
						</ol>
						<div class="carousel-inner">
							<div class="item active left pitem">
								<img class="pitem" alt="" src="${pageContext.request.contextPath }/images/providerLogo1.jpg" />

							</div>
							<div class="item next left pitem">
								<img class="pitem" alt="" src="${pageContext.request.contextPath }/images/providerLogo2.jpg" />

							</div>
							<div class="item pitem">
								<img class="pitem" alt="" src="${pageContext.request.contextPath }/images/providerLogo3.jpg" />

							</div>
						</div> <a data-slide="prev" href="#carousel-755048" class="left carousel-control">‹</a> <a data-slide="next" href="#carousel-755048" class="right carousel-control">›</a>
					</div>
				</div>

				<div class="span3 c_finfo">
					<h5 class="c_info_title">入驻供应商</h5>
					<span class="c_number"><i>0</i><i>0</i><i>0</i><i>0</i><i>0</i><i>0</i></span>
					<span class="num" style="display: none;">${providerCount}</span>
					<div class="c_info_input">
						<p class="c_info_name">你是 XXX</p>
						<button class="btn btn-primary c_button" data-toggle="button">上传面料</button>
					</div>
					<div class="c_info_output">
						<p class="c_info_name"><a href="#" style="color:red">没有账号？</a></p>
						<button class="btn btn-primary c_button" data-toggle="button">加入我们</button>
					</div>
				</div>
			</div>

			<div class="row-fluid">
				<div class="span8">
					<h3>
						面料供应商
					</h3>
					<c:forEach items="${providerInfoList}" var="providerInfo">
						<div class="row-fluid providerName">
							<div class="span4">
								<a href="${pageContext.request.contextPath}/provider/providerDetail.do?id=${providerInfo.id}"><img alt="140x140" src="${providerInfo.photo_link}" class="img-polaroid" /> </a>
							</div>
							<div class="span8 provider-info">
								<p>
									<strong>供应商名称：${providerInfo.name}</strong>
								</p>
								<dl>
									<dt>
										供应商简介：
									</dt>
									<dd>
										${providerInfo.introduction}
									</dd>
								</dl>
								<table class="table">
									<tbody>
										<tr>
											<td>
												联系电话：
											</td>
											<td>
											${providerInfo.phone}
											</td>
											<tr>
											<td>
												注册时间：
											</td>
											<td>
											<fmt:formatDate value="${providerInfo.update_time}" pattern="yyyy-MM-dd"/>
											</td>
											</tr>
										</tr>
										<tr>
										<td>
												地址：
											</td>
											<td>
											${providerInfo.address}
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</c:forEach>
					<!--分页-->
								<div class="paging">
								    <div style="display: none;">		        
									    <span class="pages">${json.property.pageCount}</span>  <!--页数-->  
								        <span class="pageIndex">${json.property.pageIndex}</span>  <!--当前页码-->  
								        <span class="pagesize">3</span>   <!--每页记录数-->  
								        <span class="hasNext">${json.property.hasNext}</span>   <!--是否有下一页(boolean)-->  
								        <span class="selfUrl">/provider/providerInfo.do</span>    <!--请求action-->
								        <span class="commonUrl">${pageContext.request.contextPath}</span>   <!--绝对路径-->
								    </div>
								    <div class="showPaging">
								        <a class="prev" href="${pageContext.request.contextPath}/provider/providerInfo.do?pageindex=${json.property.pageIndex-1 }&pagesize=3">
										上一页</a> 
									<select class="pageNum" style="font-size: 12px;">
										<option value="0">请选择跳转的页数</option>
										<option value="1">第1页</option>
									</select> 
									<a class="next" href="${pageContext.request.contextPath}/provider/providerInfo.do?pageindex=${json.property.pageIndex+1 }&pagesize=3">
										下一页</a>
								    </div>
								</div>
								<!--分页结束-->
				</div>
				<div class="span4 limit-width">
					<h3>
						供应商人气排行
					</h3>
					<table class="table">
						<tbody>
							<c:forEach items="${providerInfoBytimeList}" var="providerInfoBytime" begin="0" end="8">
								<tr>
									<th>
										NO.1:
									</th>
									<th>
										${providerInfoBytime.name}
									</th>
									<th>
										人气：
									</th>
									<th>
										${providerInfoBytime.fabric.liked}
									</th>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

	<!-- 页脚部分 -->
	<footer>
	</footer>
</body>
</html>